<?php
/* @var $this Ajde_Template_Parser_Phtml_Helper */
?>

<div id="cart_widget" data-quickcheckout='<?php echo $this->quickcheckout ? 1 : 0; ?>'>
	<table class='cart'>
		<colgroup>			
			<col width="1*"/>
			<col width="40" />
			<col width="70" />
		</colgroup>
	<?php if ($this->items->length() === 0) { ?>
		<tr>
			<td colspan='3'><?php echo __('Your cart is empty'); ?></td>
		</tr>
	<?php } else { ?>
		<?php foreach($this->items as $item) { 
			/* @var $item CartItemModel */ ?>
			<tr>
				<td><?php echo $item->getDescription(); ?></td>
				<td class='qty'><?php echo $item->getQty(); ?> &#215;</td>
				<td><?php echo $item->getFormattedUnitprice(); ?></td>
			</tr>
		<?php } ?>
		<tfoot>
			<tr>
				<td colspan='2'><?php echo __('Total'); ?></td>			
				<td><?php echo $this->items->getFormattedTotal(); ?></td>
			</tr>
		</tfoot>
	<?php } ?>
	</table>

	<?php if ($this->quickcheckout && $this->items->length()) { ?>
	<p>
		<a class='action small' href="shop/checkout">Checkout</a> or <a href="shop/cart:edit">Edit cart</a>
	</p>
	<?php } ?>
</div>